#!/usr/bin/env python3

singers = []


def menu():
    print('1.加歌手')
    print('2.出歌手')
    print('3.现有歌手')
    print('4.退出')
    return input('请选择:')


def add_singer():
    name = input('请输入歌手的名字:')
    singers.insert(0, name)
    print('添加成功\n')


def del_singer():
    if len(singers) > 0:
        name = singers.pop(0)
        print('歌手{0}出来了\n'.format(name))
    else:
        print('没有歌手了\n')


def show_singer():
    print('现有歌手')
    print(singers, '\n')


f = {'1': add_singer, '2': del_singer, '3': show_singer}


def main():
    while True:
        choice = menu()
        if choice in f:
            f[choice]()
        else:
            break


if __name__ == '__main__':
    main()
